package com.lhk.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//@Component组件等价于<bean id="User" class="com.lhk.pojo.User"/>
@Component
@Scope("prototype") //作用域
public class User {

    //@Value("lhk")相当于<property name="name" value="lhk"/>
    @Value("lhk")
    public String name;
}
